import requestProxy from '@/utils/request';
const { request } = requestProxy;

// 进项发票列表顶部tab
export function getInputInvoiceTab(params) {
  return request({
    url: 'admin/inputInvoice/tab',
    method: 'get',
    params
  });
}

// 进项发票列表
export function getInputInvoiceList(params) {
  return request({
    url: 'admin/inputInvoice/list',
    method: 'get',
    params
  });
}

// 进项发票详情
export function getInputInvoiceDetail(id, params) {
  return request({
    url: `admin/inputInvoice/detail/${id}`,
    method: 'get',
    params
  });
}

// 进项发票日志
export function getInputInvoicelog(params) {
  return request({
    url: 'admin/inputInvoice/log',
    method: 'get',
    params
  });
}

// 进项发票操作
export function operateInputInvoice(params) {
  return request({
    url: 'admin/inputInvoice/operate',
    method: 'put',
    params
  });
}

// 新建进项发票
export function addInputInvoice(data) {
  return request({
    url: 'admin/inputInvoice/create',
    method: 'post',
    data
  });
}

// 进项发票编辑
export function editInputInvoice(data) {
  return request({
    url: 'admin/inputInvoice/edit',
    method: 'put',
    data
  });
}

// 进项发票编辑
export function getWithdrawInfo(params) {
  return request({
    url: 'admin/inputInvoice/withdrawInfo',
    method: 'get',
    params
  });
}

// 进项发票编辑
export function getInputInvoiceStatistics(params) {
  return request({
    url: 'admin/inputInvoice/statistics',
    method: 'get',
    params
  });
}
// 获取符合条件的发票
export function getFitInvoiceList(params) {
  return request({
    url: 'admin/inputInvoice/fitInvoice',
    method: 'get',
    params
  });
}
